Skip to content

feat(mcp-core): support Mcp-Name header for Streamable HTTP (SEP-2243) - #994

Open
cooleditphoto wants to merge 10 commits into
modelcontextprotocol:mainfrom
cooleditphoto:feature/SEP-2243-Mcp-Name-in-header
Open

feat(mcp-core): support Mcp-Name header for Streamable HTTP (SEP-2243)#994
cooleditphoto wants to merge 10 commits into
modelcontextprotocol:mainfrom
cooleditphoto:feature/SEP-2243-Mcp-Name-in-header

Conversation

@cooleditphoto

@cooleditphoto cooleditphoto commented Jun 3, 2026

Copy link
Copy Markdown

Add MCP_NAME header constant and inject it in the streamable HTTP client transport (HttpClientStreamableHttpTransport) and HTTP server transport

Motivation and Context

#990
To solve the Mcp_Name part of https://modelcontextprotocol.io/seps/2243-http-standardization

How Has This Been Tested?

[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:44 min
[INFO] Finished at: 2026-06-02T09:02:38-04:00
[INFO] ------------------------------------------------------------------------

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Add MCP_NAME header constant and inject it in the streamable HTTP client transport (HttpClientStreamableHttpTransport)
@Kehrlann
Kehrlann self-requested a review June 24, 2026 12:49
@Kehrlann Kehrlann self-assigned this Jun 24, 2026
@Kehrlann

Copy link
Copy Markdown
Contributor

Hey @cooleditphoto ! Thanks for your contribution.

A few remarks:

  • This PR breaks backwards client/server compatibility. Servers cannot afford to reject non-compliant clients directly. We could allow users to configure their users so that they reject requests without the headers, but it shouldn't be the default.
  • This PR has no test coverage.
  • This does not cover SEP-2243 entirely, which makes tracking 2243 implementation complicated

@cooleditphoto

Copy link
Copy Markdown
Author

@Kehrlann I addressed your comments.

@slachiewicz

Copy link
Copy Markdown
Contributor

Flagging an overlap so it doesn't get discovered at merge time: #1112 (mine, still draft) also implements Mcp-Name, and touches three of the same files as this PR — HttpClientStreamableHttpTransport, HttpServletStreamableServerTransportProvider and HttpHeaders. #1026 covers the Mcp-Method half on two of them. Three open PRs against #990.

This one is furthest along and already has review on it, so I'd rather not cut across it. I'm happy to strip Mcp-Name out of #1112 and rebase what's left — the protocol-version validation and the server-side header/body consistency checks — on top of this once it lands. Say the word and I'll do that rather than have maintainers reconcile three diffs.

This comment was created with AI assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Development

Successfully merging this pull request may close these issues.

3 participants